package zhousi;
import java.util.Arrays;
import java.util.Scanner;
public class learn4 {
    public static void main(String [] args){
        //有五个班五名学生课程的成绩，如何计算五个班各自的总成绩
        //初始化二维数组
        int num[][]={{1,2,3,4,5},{6,7,8,9,10},{11,12,13,14,15},{16,17,18,19,20},{21,22,23,24,25}};
        System.out.println();
        //循环控制数组的元素
        for(int i=0;i<5;i++){
            int countNum=0;
            for(int j=0;j<5;j++){
                countNum+=num[i][j];
            }
            System.out.println("第"+(i+1)+"班级的成绩"+countNum);
        }


    }
}
